# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-mines
pkgver=40.1
pkgrel=1
pkgdesc="Clear hidden mines from a minefield"
url="https://wiki.gnome.org/Apps/Mines"
arch=(x86_64)
license=(GPL)
depends=(gtk3 librsvg libgnome-games-support)
makedepends=(yelp-tools appstream-glib vala git meson)
groups=(gnome-extra)
_commit=c7a2abc8a62a2d313959db76df3a811209409dc9  # tags/40.1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-mines.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
